package com.schedule.common;
/**
 * 基于ThreadLocal封装工具类，保存与获取在同一线程中用户存储在在session中的id
 */
public class BaseContext {
    public static ThreadLocal<Long> threadLocal=new ThreadLocal<>();

    public static void setCurrent(Long id){
        threadLocal.set(id);
    }
    public static Long getCurrent(){
        return threadLocal.get();
    }
}
